import UserModel from "../../../models/User";
import Crypt from "../../../utils/Crypt";
import config from "../../../config/config";

const userModel = new UserModel()

Page({
  data: {
    list: [],
    baseUrl: config.app_base_url
  },
  onShow: function (options) {
    userModel.qrcodeList(/*{ scene: 1195 }*/).then(response => {
      let { data } = response
      data = Crypt.parse(data)
      this.setData({ list: data.list })
    })
  },

  // 放大才能识别二维码
  previewImage(e) {
    const current = e.currentTarget.dataset.src
    wx.previewImage({
      current: current,
      urls: [current]
    })
  }

});
